home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: April 12 1996
- // Author: sspence
- //
- // Description:
- // These procs sets the state of controls in the property sheet.
- // See also curveProperties.mel which constructs the property
- // sheet.
- //
- // Input Arguments:
- // $toolName - this is the name of the instance of the tool
- // that the property sheet is modifying.
- //
- // Return Value:
- // None.
- //
-
- global proc curveValues ( string $toolName, string $type, string $ctxCmd ) {
- //
- // Description:
- // Sets the state of the property sheet based on the values
- // in the tool context.
- //
-
- // set my top layout to be the current parent
- //
- string $parent = (`toolPropertyWindow -q -location` + "|" + $type );
- setParent $parent;
-
- // set property sheet name and icon
- //
- string $icon;
- string $helpTag;
- if ($type == "curveCV") {
- frameLayout -edit -l "CV Curve Settings" geometryOptions_F;
- $icon = "curveCV.xpm";
- checkBoxGrp -e -v1 `eval($ctxCmd + " -q -me " + $toolName)`
- curveCVMEKBox;
- $helpTag = "CVCurveTool";
- }
- else if ($type == "curveSketch") {
- frameLayout -edit -l "Pencil Curve Settings" geometryOptions_F;
- $icon = "pencil.xpm";
- $helpTag = "PencilCurveTool";
- }
- else if ($type == "curveEP") {
- frameLayout -edit -l "EP Curve Settings" geometryOptions_F;
- $icon = "curveEP.xpm";
- $helpTag = "EPCurveTool";
- }
- toolPropertySetCommon $toolName $icon $helpTag;
-
- // select proper radio buttons for the degree
- //
- int $i = eval($ctxCmd + " -q -d " + $toolName);
- if ($type == "curveSketch") {
- switch ($i) {
- case 1:
- radioButtonGrp -e -select 1 curveDegreeRadio1;
- break;
- case 3:
- radioButtonGrp -e -select 2 curveDegreeRadio1;
- break;
- }
- }
- else
- {
- switch ($i) {
- case 1:
- radioButtonGrp -e -select 1 curveDegreeRadio1;
- break;
- case 2:
- radioButtonGrp -e -select 2 curveDegreeRadio1;
- break;
- case 3:
- radioButtonGrp -e -select 1 curveDegreeRadio2;
- break;
- case 5:
- radioButtonGrp -e -select 2 curveDegreeRadio2;
- break;
- case 7:
- radioButtonGrp -e -select 1 curveDegreeRadio3;
- break;
- }
- }
-
- if ($type == "curveCV" || $type == "curveEP") {
-
- // Set knot parameterisation
- //
- int $isUniform = eval($ctxCmd + " -q -un " + $toolName);
- if ( $isUniform ) {
- radioButtonGrp -e -select 1 curveKnotTypeRadio1;
- }
- else {
- radioButtonGrp -e -select 2 curveKnotTypeRadio1;
- }
- }
-
- /*
- if ($type == "curveEP") {
-
- // Set shape behaviour
- //
- int $isPreserveShape = eval($ctxCmd + " -q -ps " + $toolName);
- if ( $isPreserveShape ) {
- radioButtonGrp -e -select 1 curveShapeTypeRadio1;
- }
- else {
- radioButtonGrp -e -select 2 curveShapeTypeRadio1;
- }
-
- // Set editing shape behaviour
- //
- floatSliderGrp -e -v `eval($ctxCmd + " -q -pf " + $toolName)`
- fractionSlider;
- }
- */
- toolPropertySelect $type;
- }
-